Skip to content

Update network configuration for a cluster

Request

Requires node::configure:network permissions

Security
JWTAuthorizer
Path
clusterFQDNstringrequired

Cluster FQDN

Bodyapplication/jsonrequired

Network Config

aclsArray of objects
darkModeboolean
forwardingboolean
interfacesArray of objects
natsArray of objects

NAT rules (SNAT, DNAT, masquerade) applied to this interface. Duplicate source/dest CIDR pairs are allowed when differentiated by route metric.

routesArray of objects
rulesArray of objects
tunnelsArray of objects
vrfsArray of objects
curl -i -X PUT \
  'https://apidocs.trustgrid.io/_mock/cluster/{clusterFQDN}/config/network' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "acls": [
      {
        "action": "allow",
        "description": "string",
        "dest": "string",
        "line": 1,
        "ports": "string",
        "protocol": "any",
        "source": "string"
      }
    ],
    "darkMode": true,
    "forwarding": true,
    "interfaces": [
      {
        "cloudRoutes": [
          {
            "description": "My route",
            "route": "192.168.10.0/24"
          }
        ],
        "clusterIP": "string",
        "clusterRouteTables": [
          "string"
        ],
        "clusterRoutes": [
          {
            "description": "My route",
            "route": "192.168.10.0/24"
          }
        ],
        "description": "My interface",
        "dhcp": false,
        "dhcpPool": "string",
        "dns": [
          "string"
        ],
        "duplex": "full",
        "gateway": "string",
        "ip": "string",
        "mode": "auto",
        "mtu": 1500,
        "nic": "eth0",
        "routes": [
          {
            "description": "My route",
            "next": "192.168.10.10",
            "route": "192.168.10.0/24"
          }
        ],
        "speed": 0,
        "subInterfaces": [
          {
            "description": "My interface",
            "ip": "string",
            "routes": [
              {
                "description": "My route",
                "next": "192.168.10.10",
                "route": "192.168.10.0/24"
              }
            ],
            "vlanID": 1,
            "vrf": "default"
          }
        ],
        "virtual": false,
        "vrf": "default"
      }
    ],
    "nats": [
      {
        "description": "string",
        "dest": "string",
        "masquerade": true,
        "source": "string",
        "toDest": "string",
        "toSource": "string"
      }
    ],
    "routes": [
      {
        "description": "string",
        "dest": "string",
        "dev": "string",
        "metric": 1,
        "via": "string"
      }
    ],
    "rules": [
      {
        "action": "accept",
        "description": "string",
        "dest": "string",
        "dmac": "string",
        "dnat": "string",
        "iface": "string",
        "in": "string",
        "line": 1,
        "ports": "string",
        "protocol": "any",
        "snat": true,
        "source": "string",
        "vrf": "string"
      }
    ],
    "tunnels": [
      {
        "description": "string",
        "destination": "string",
        "dpdInterval": 0,
        "dpdRetries": 0,
        "enabled": true,
        "ike": 1,
        "ikeCipher": "aes128-sha1",
        "ikeGroup": 2,
        "ip": "string",
        "ipsecCipher": "aes128-sha1",
        "localId": "string",
        "mtu": 1000,
        "name": "string",
        "networkId": "string",
        "pfs": 0,
        "presharedKey": "string",
        "psk": "string",
        "publicKey": "string",
        "rekeyInterval": 0,
        "remoteId": "string",
        "replayWindow": 32,
        "type": "ipsec",
        "vrf": "string"
      }
    ],
    "vrfs": [
      {
        "acls": [
          {
            "action": "allow",
            "description": "string",
            "dest": "string",
            "line": 1,
            "ports": "string",
            "protocol": "any",
            "source": "string"
          }
        ],
        "description": "string",
        "forwarding": true,
        "name": "string",
        "nats": [
          {
            "description": "string",
            "dest": "string",
            "masquerade": true,
            "source": "string",
            "toDest": "string",
            "toSource": "string"
          }
        ],
        "routes": [
          {
            "description": "My route",
            "dest": "string",
            "dev": "string",
            "metric": 1,
            "via": "string"
          }
        ],
        "rules": [
          {
            "action": "accept",
            "description": "string",
            "dest": "string",
            "dmac": "string",
            "dnat": "string",
            "iface": "string",
            "in": "string",
            "line": 1,
            "ports": "string",
            "protocol": "any",
            "snat": true,
            "source": "string",
            "vrf": "string"
          }
        ]
      }
    ]
  }'

Responses

OK

Response
No content